package com.liru.chat_demo.service;

import dev.langchain4j.service.MemoryId;
import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.UserMessage;
import dev.langchain4j.service.spring.AiService;
import dev.langchain4j.service.spring.AiServiceWiringMode;
import reactor.core.publisher.Flux;

@AiService(
        wiringMode = AiServiceWiringMode.EXPLICIT,
        chatModel = "openAiChatModel",
        streamingChatModel = "openAiStreamingChatModel",
        //chatMemory = "chatMemory",
        chatMemoryProvider = "chatMemoryProvider"
        //contentRetriever = "contentRetriever"
)
public interface Assistant {

    @SystemMessage("你是一个文档分析助手小红")
    Flux<String> chat(@MemoryId String memoryId,@UserMessage String userMessage);

    @SystemMessage("你是一个文档分析助手小红")
    String chat1(@MemoryId String memoryId,@UserMessage String userMessage);
}